package modelo.reglas.composite;

import modelo.reglas.ISpecification;

public class BaseOperatorSpecificationFactory {

	public static ISpecification build(BaseOperatorSpecification type,
			ISpecification leftValue, ISpecification rightValue) {

		switch (type) {
		case AND:
			return new AndSpecification(leftValue, rightValue);
		case OR:
			return new OrSpecification(leftValue, rightValue);
		case NOT:
			return new NotSpecification(leftValue);
		}
		return null;
	}
}
